CI: build nixos manual also on PRs targeting secondary branches#509875
CI: build nixos manual also on PRs targeting secondary branches#509875m1-s wants to merge 1 commit intoNixOS:masterfrom
Conversation
| if: | | ||
| contains(matrix.builds, 'manual-nixos') && !cancelled() && | ||
| contains(fromJSON(inputs.baseBranch).type, 'primary') | ||
| if: contains(matrix.builds, 'manual-nixos') && !cancelled() |
There was a problem hiding this comment.
cc @NixOS/nixpkgs-ci
Doesn't that mean we try to schedule manual builds for staging which will timeout anyways after consuming a whole lot of resources?
Perhaps we should explicitly allow staging-nixos here as well?
(Mostly a question to the CI team, not a proposal since I'm not sure I understand it correctly)
There was a problem hiding this comment.
It certainly seems an overkill to build the manual when targeting staging or staging-25.11.
There was a problem hiding this comment.
Going of memory here, so I could be wrong. But I believe the manual is built using packages from the ci-pinned nixpkgs. Only the markdown sources come from the PR branch.
There was a problem hiding this comment.
I think thats true for the nixpkgs manual but not for the nixos manual.
manual-nixos = (import ../nixos/release.nix { }).manual.${system} or null;
manual-nixpkgs = (import ../doc { inherit pkgs; });In the nixos/release.nix nixpkgs is declared as:
nixpkgs ? {
outPath = cleanSource ./..;
revCount = 708350;
shortRev = "gfedcba";
},So I assume the nixos manual uses the current state that is in the PR. Is rebuilding the nixos manual feasible in PRs to staging-nixos or does it cost too much resources? Do we only want to allow staging-nixos or all secondary branches?
There was a problem hiding this comment.
Without checking, I assume staging-nixos is fine (as that should not contain mass rebuilds of packages, only tests, which building the manual should not require). staging (and staging-2x.xx) will be problematic (building the manual will probably time out most of the time). staging-next (and staging-next-2x.xx) are probably somewhat better than staging (as the packages needed to build the manual will likely be cached much of the time), but still quite problematic (would still block valid merges due to timeouts).
The other secondary branch is haskell-updates; not sure about the tradeoff for that.
In #491742 we discovered that the nixos manual is not built on PRs targeting staging-nixos branch. This is because the nixos manual is only built on PRs that target primary branches and staging-nixos is a secondary branch. The nixpkgs manual in contrast is being built on secondary branches so it seems that this is an inconsistency. This PR fixes this by adjusting the nixos manual build conditions to match the ones from the nixpkgs manual.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.